import { BaseWindow } from "../../../../component/window/BaseWindow";
import { ILayer } from "../../../../mvc/interfaces/ILayer";
import { Language } from "../../../../../extend/language/Language";
import { ObjCreate } from "../../common/ObjCreate";
import { GTextFormat } from "../../../../common/GTextFormat";
import { FontUtil } from "../../../../common/font/FontUtil";
import { ECopyType } from "../../../../../Message/Public/ECopyType";
import { PulseSharedObject } from "../../player/PulseSharedObject";
import { TodayNoTipsConst } from "../../../../component/gconst/TodayNoTipsConst";
import { CheckBox } from "../../../../../fl/controls/CheckBox";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
type int = number;
//class RobCityCopyRule
    
    export  class RobCityCopyRule extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            titleHeight = 26;
            setSize(333, 328);
            title = Language.getString(60953);
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            ObjCreate.createBg(17, 38, 300, 254, this);
            var loc1=new GTextFormat(FontUtil.songtiName, 12, 11661311);
            loc1.leading = 3;
            this._tfRule = ObjCreate.createGTextField("", 24, 48, 290, 245, this, loc1);
            this._tfRule.multiline = true;
            this._tfRule.wordWrap = true;
            this._tfRule.mouseEnabled = false;
            this._cbTodayNoTips = ObjCreate.createCheckBox(Language.getString(41856), 205, 294, 120, 28, this);
            this._cbTodayNoTips.addEventListener(flash.events.Event.CHANGE, this.onChange);
            return;
        }

        public set ruleText(arg1: string)
        {
            this._tfRule.htmlText = arg1;
            return;
        }

        public set copyType(arg1: int)
        {
            this._copyType = arg1;
            return;
        }

        /* internal  */onChange(arg1: Object /* flash.events.Event */): void
        {
            var loc1=this._copyType;
            switch (loc1) 
            {
                case ECopyType._ECopyRobCityOne:
                {
                    PulseSharedObject.saveValue(TodayNoTipsConst.RobCityCopyOneTip, this._cbTodayNoTips.selected);
                    break;
                }
                case ECopyType._ECopyRobCityTwo:
                {
                    PulseSharedObject.saveValue(TodayNoTipsConst.RobCityCopyTwoTip, this._cbTodayNoTips.selected);
                    break;
                }
                case ECopyType._ECopyRobCityThree:
                {
                    PulseSharedObject.saveValue(TodayNoTipsConst.RobCityCopyThreeTip, this._cbTodayNoTips.selected);
                    break;
                }
            }
            return;
        }

        /* internal */ /* var */_cbTodayNoTips: CheckBox;

        /* internal */ /* var */_tfRule: GTextFiled;

        /* internal */ /* var */_copyType: int;
    }
